Thesis Sam merge - #3
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR merges a broad set of “thesis” updates across analysis notebooks, adds new compact decoding training/pipeline scripts, and substantially extends the Dash visualization layer (new choice filters, improved ensemble plots, and a new session-summary panel), plus introduces a parallelized GLM workflow for single-neuron encoding screens.
Changes:
- Add compact interval decoding pipelines + CLI training scripts (interval-wise and session-wise), including shuffle/bootstrap significance support.
- Introduce a parallel negative-binomial GLM notebook and supporting multiprocessing utilities (with caching) for large-scale single-neuron encoding screens.
- Update Dash plots/wrappers to support R1/R2 choice filters, improve performance/UX of ensemble ridgeline plots, add session summary plot, and tweak session labeling/colormaps; plus minor notebook/session-exclusion updates.
Reviewed changes
Copilot reviewed 31 out of 46 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripted_plotting/hmm_actions.ipynb | Notebook metadata update (kernel display name / Python version). |
| scripted_plotting/animal_6_analysis/single_cell_correlations.ipynb | Update default excluded sessions list used in analysis. |
| scripted_plotting/animal_6_analysis/regression_reversal.ipynb | Update default excluded sessions list used in analysis. |
| scripted_plotting/animal_6_analysis/neuron_encoding_check.ipynb | Update excluded sessions list (removes prior inline comment). |
| scripted_plotting/animal_6_analysis/neuron_classification_trackwise.ipynb | Update excluded sessions list (removes prior inline comment). |
| scripted_plotting/animal_6_analysis/interval_session_decoding_train.py | New CLI driver to train session-level interval decoders and save compact outputs. |
| scripted_plotting/animal_6_analysis/interval_session_decoding_pipeline.py | New session-level interval decoding pipeline with shuffle significance and multiprocessing support. |
| scripted_plotting/animal_6_analysis/interval_decoding_train.py | New CLI driver to train interval decoders (optionally parallel across assemblies) and save outputs. |
| scripted_plotting/animal_6_analysis/interval_decoding_pipeline.py | New compact interval decoding pipeline with grouped CV, shuffle, and bootstrap significance. |
| scripted_plotting/animal_6_analysis/ensemble_regression.ipynb | Update default excluded sessions list used in analysis. |
| scripted_plotting/animal_6_analysis/choice_encoding_glm_parallel.ipynb | New notebook implementing parallelized single-neuron NB-GLM feature screens. |
| scripted_plotting/animal_6_analysis/choice_encoding_glm_parallel_utils.py | New multiprocessing helpers for parallel GLM screening + FDR postprocessing. |
| scripted_plotting/animal_6_analysis/.gitignore | Ignore generated analysis artifacts (runs/figures/cache/etc.) within animal_6_analysis. |
| requirements.txt | Add statsmodels dependency needed by GLM workflows. |
| ephys_preprocessing/postproc_mea1k_ephys.py | Add TODO note clarifying potential PCA projection formula concern. |
| dashsrc/plot_components/plots/plot_unit_fr_stability.py | Remove unused zscore import. |
| dashsrc/plot_components/plots/plot_StayPerformance.py | Add schema-compat column aliases/derivations + session labeling tweaks; adjust unit conversions. |
| dashsrc/plot_components/plots/plot_SessionKinematics.py | Add grouping options for R1/R2 choice and explicit error on unknown group_by. |
| dashsrc/plot_components/plots/plot_EnsembleTrialwise.py | Performance/robustness updates: safer index reset, interval_name handling, fewer traces/shapes, improved hover. |
| dashsrc/plot_components/plots/plot_EnsembleSessionwise.py | Add session summary plot, reduce trace count, improve session ordering/labeling, optional single-trial display. |
| dashsrc/plot_components/plots/plot_AnimalKinematics.py | Display only session date portion in tick labels. |
| dashsrc/plot_components/plot_wrappers/wrapper_TrackwiseEnsembleProj.py | Wire new R1/R2 choice filters through wrapper + UI controls. |
| dashsrc/plot_components/plot_wrappers/wrapper_TrackFiringRate.py | Wire new R1/R2 choice filters through wrapper + UI controls. |
| dashsrc/plot_components/plot_wrappers/wrapper_EnsembleTrialwise.py | Refactor filtering pipeline, add session-summary subplot, and return both summary + session detail figures. |
| dashsrc/plot_components/plot_wrappers/wrapper_EnsembleSessionwise.py | Replace event dropdown impl, add session summary graph + single-trial toggle, and refactor filtering helpers. |
| dashsrc/plot_components/plot_wrappers/data_selection_components.py | Show session “date” only in slider marks (split on underscore). |
| dashsrc/components/data_loading_controls.py | Add faster session exclusion path using unity_trial_n_rows when present. |
| dashsrc/components/dashvis_constants.py | Update R1/R2 choice colormaps. |
| assets/sessionwise_controls.css | New CSS to improve multi-select event dropdown sizing/z-index. |
| .gitignore | Ignore interval_decoding_runs output and .claude directory. |
Comments suppressed due to low confidence (1)
dashsrc/plot_components/plots/plot_StayPerformance.py:79
- _draw_success_rate currently prints debug output on every render, which will spam logs and slow down Dash callbacks. These should be removed or gated behind an explicit debug flag/logger level.
def _draw_success_rate(fig, all_data, double_reward_filter=None):
print("INNNN")
print(double_reward_filter)
if double_reward_filter == [] or double_reward_filter is None or sorted(double_reward_filter) == ['Early R', 'Late R']:
print("in double")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Latest updatse (plots, debugging, GUI changes, etc.)